Create an attempt on a specific package. The package must have already been added to LearningStore. Following this method, Start or MoveToActivity must be called in order to deliver the first activity.
Parent Type: StoredLearningSession
Namespace: Microsoft.LearningComponents.Storage
Assembly: Microsoft.LearningComponents.Storage.dll
| C# |
|
public static StoredLearningSession CreateAttempt ( ) |
packageStore
The store which contains files from the package associated with the attempt.
learnerId
The learner who is starting the attempt.
rootActivityId
The LearningStore id of the organization (ie, root activity) to be attempted.
loggingOptions
Value to indicate the level of logging requested during an attempt.
Returns a session representing the new attempt. The AttemptStatus of the session will be Active.
| Exception type | Condition |
| ArgumentNullException | Thrown when packageStore, learnerId or rootActivityId parameters are null. |
| ArgumentOutOfRangeException | Thrown when loggingOptions does not contain a valid value. |
| LearningStoreItemNotFoundException | Thrown if the learnerId or rootActivityId do not represent valid objects in LearningStore. |
This method adds attempt information to LearningStore.
After creating the attempt, the caller must call Start or MoveToActivity to identify the first activity for delivery.